/**
 * \file kernel/driver/hid/mouse.h
 * \author Davide Gessa
 * \date 10-12-09
 */
#ifndef DRIVER_HID_MOUSE_H
#define DRIVER_HID_MOUSE_H

#include <types.h>
#include <klibc/ctype.h>
#include <driver.h>

#define IRQ_MOUSE		12

extern driver_t driver_mouse;

/**
 * Pacchetto mouse
 */
typedef struct
{
	uint8_t y_overflow:1;
	uint8_t x_overflow:1;
	uint8_t y_sign_bit:1;
	uint8_t x_sign_bit:1;
	uint8_t alw_1:1;
	uint8_t middle_btn:1;
	uint8_t right_btn:1;
	uint8_t left_btn:1;
	
	uint8_t x_movement;
	uint8_t y_movement;
} mouse_packet_t;



static void mouse_callback(regs_t *);
uint32_t mouse_init();
uint8_t mouse_read();
void mouse_write(uint8_t);
void mouse_wait(uint8_t);
uint32_t mouse_get_x();
uint32_t mouse_get_y();


#endif
